<h1>Estatísticas</h1>

<h3> Inscritos </h3>

<p>
<strong> Total: </strong> <%= @n_attendees %>

</p>

<p>
<strong> Alojamento: </strong> <%= @n_lodge %>

</p>

<p>
<strong> Inscritos na fila do alojamento: </strong> <%= @n_queue %>

</p>

<p>
<strong> Pagos: </strong> <%= @n_paid %>

</p>

<p>
<strong> Pagos e alojamento: </strong> <%= @n_paid_lodge %>

</p>

<p>
<strong> Inscritos com camiseta: </strong> <%= @n_shirts %>

</p>

<p>
<strong> Tutores: </strong>

    <table>
        <tr>
            <td>Nome</td> <td>PET</td> <td>IES</td>
        </tr>
        <% for tutor in @tutors %>
            <tr>
                <td><%= tutor.name %></td> <td><%= tutor.pet%></td> <td><%= tutor.ies%></td>
            </tr>
    	<% end %>

    </table>

</p>

<h3>GDs</h3>

 <table>
    <tr> <td> GD </td> <td> Inscritos </td>
<% @n_gds.each_with_index do |e,i| %>
    <%= "<tr><td>#{description_gds.invert[i]}</td> <td>#{e}</td></tr>" %>
    <tr><td><%= toggle_hidden_element "gd_attendees_#{i}", :show => "Participantes" %></td></tr>
	<tr><td> <%= hidden_element render(:partial => 'gd_attendees', :locals => {:i => i}), :id => "gd_attendees_#{i}" %> </td></tr>
<% end %>
</table>

<h3>Inscritos por área</h3>

 <table>
<% @areas.each_with_index do |e,i| %>
    <%= "<tr><td>#{areas.invert[i]}</td></tr>" %>
    <tr><td><%= toggle_hidden_element "area_attendees_#{i}", :show => "Inscritos" %></td></tr>
	<tr><td> <%= hidden_element render(:partial => 'area_attendees', :locals => {:area => @areas[i] }), :id => "area_attendees_#{i}" %> </td></tr>
<% end %>
</table>
